//
//  CYTool.h
//  testNSDate
//
//  Created by caoyuan on 6/6/16.
//  Copyright © 2016 caoyuan. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CYTool : NSObject

/**
 *  NSDate *date = [self dateFromDateString:@"19870318 11:11:11" withFormat:@"yyyyMMdd HH:mm:ss"];
 *
 *  @param dateStr string
 *
 *  @return NSDate
 */
+ (NSDate *)dateFromDateString:(NSString *)dateStr
                    withFormat:(NSString *)dateFormat;
/**
 * NSString *dateStr = [self stringFromDate:date withFormat:@"yyyyMMdd HH:mm:ss"];
 *
 *  @param date NSDate
 *
 *  @return str
 */
+ (NSString *)stringFromDate:(NSDate *)date
                  withFormat:(NSString *)dateFormat;
@end
